#include <iostream>
 using namespace std;
 int first=1;
 int sum(int *p, int n)
 {
  if(first){
   if(n==0) return 0;
   first=0;
   n=n-1;}
  if(n==0) return p[0];
  return p[n]+sum(p,n-1);
 }
 
 int main()
 {
  int n;
  cin>>n;
 int *a = new int [n];
 for(int i=0;i<n;i++)
 {
  cin>>a[i];
 }
 cout<<sum(a,n);
 delete []a;
  return 0;
 }
